<template>
	<view class="addAddress" :style="{height: pageHeight + 'px'}">
		<view style="width: 345px;margin: 0px auto 0 auto;background-color: #fff;border-radius: 10px;padding: 15px 15px 15px 15px;box-sizing: border-box;">
			<view style="display: flex;align-items: center;margin: 0 auto;">
				<text style="flex: 0 0 90px;font-size: 14px;">昵称</text>
				<view style="flex: 1;text-align: right;display: flex;align-items: center;width: 100%;justify-content: flex-end;font-size: 14px;">
					<u--input
					    placeholder="请输入收货人的姓名"
					    border="none"
					  ></u--input>
				</view>
			</view>
			<u-line color="rgba(40, 44, 49, 0.1)" style="margin: 15px auto;"></u-line>
			<view style="display: flex;align-items: center;margin: 0 auto;">
				<text style="flex: 0 0 90px;font-size: 14px;">手机号码</text>
				<view style="flex: 1;text-align: right;display: flex;align-items: center;width: 100%;justify-content: flex-end;font-size: 14px;">
					<u--input
					    placeholder="请输入与您的手机号码"
					    border="none"
					  ></u--input>
				</view>
			</view>
		</view>
		
		<view style="width: 345px;margin: 15px auto 0 auto;background-color: #fff;border-radius: 10px;padding: 15px 15px 15px 15px;box-sizing: border-box;">
			<view style="display: flex;align-items: center;margin: 0 auto;">
				<text style="flex: 0 0 90px;font-size: 14px;">地区</text>
				<view style="color: rgba(40, 44, 49, 0.4);font-size: 14px;flex: 1;text-align: center;display: flex;align-items: center;width: 100%;justify-content: flex-end;font-size: 14px;">
					<text style="flex: 1;">省</text>
					<text style="flex: 1;">市</text>
					<text style="flex: 1;">县</text>
				</view>
			</view>
			<u-line color="rgba(40, 44, 49, 0.1)" style="margin: 15px auto;"></u-line>
			<view style="display: flex;align-items: center;margin: 0 auto;">
				<text style="flex: 0 0 90px;font-size: 14px;">详细地址</text>
				<view style="flex: 1;text-align: right;display: flex;align-items: center;width: 100%;justify-content: flex-end;font-size: 14px;">
					<u--input
					    placeholder="请输入详细地址"
					    border="none"
					  ></u--input>
				</view>
			</view>
		</view>
		
		<view style="width: 345px;margin: 15px auto 0 auto;background-color: #fff;border-radius: 10px;padding: 15px 15px 15px 15px;box-sizing: border-box;">
			<view style="display: flex;align-items: center;margin: 0 auto;">
				<text style="flex: 1;font-size: 14px;">
					默认地址
					<text style="margin-top: 5px;display: block;color: rgba(40, 44, 49, 0.4);font-size: 12px;">注意：开启后每次下单默认使用改地址</text>
				</text>
				<view style="flex: 0 0 30px;text-align: right;display: flex;align-items: center;width: 100%;justify-content: flex-end;font-size: 14px;">
					<u-switch v-model="switchValue" @change="switchChange" size="39"></u-switch>
				</view>
			</view>
		</view>
		
		<view class="save">
			保存
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabIndex: 0,
				pageHeight: 0,
				switchValue: false
			}
		},
		created() {
			this.$nextTick(() => {
				uni.getSystemInfo({
				  success: (res) => {  
					this.pageHeight = res.windowHeight
				  }  
				});
				
		
			})
		},
		methods: {
			switchChange() {},
		}
	}
</script>


<style lang="scss" scoped>
	.addAddress {
		background: #F7F8F9;
		padding-top: 15px;
		
		.save {
			width: 345px;
			height: 50px;
			background: #F22828;
			border-radius: 10px;
			color: #fff;
			text-align: center;
			margin: 30px auto;
			line-height: 50px;
			font-size: 14px;
		}
	}
</style>